/*
 * IdleGameStateController.h
 *
 *  Created on: Dec 27, 2011
 *      Author: rudi
 */

#ifndef IDLEGAMESTATECONTROLLER_H_
#define IDLEGAMESTATECONTROLLER_H_
#include "IGameStateController.h"
#include "LogoDrawController.h"

class MainPanel;

/**
 * This class handles the events in the game initial state
 *
 * The initial state is sert when the game is just started, or when the user closes an already started level
 * @see IGameStateController
 * @author Rudolf Heszele heszele@gmail.com
 * @version 1.0
 * @since 2012-03-08
 */
class IdleGameStateController: public IGameStateController
{
	public:
		/**
		 * The default constructor can optionally take an argument
		 *
		 * The optionally argument is taken only when the application is started, because in this case the MainPanel can not be reached through
		 * the wxGetApp method, since the window itself is not constructed yet by the wxWidgets
		 * @param mainPanel The pointer to the MainPanel placed on the window
		 */
		IdleGameStateController(MainPanel* mainPanel = NULL);
		virtual ~IdleGameStateController();

		// Methods inherited from Controller

		/**
		 * @see IController::handleMouseDown
		 */
		virtual void handleMouseDown(const wxPoint&);
		/**
		 * @see IController::handleMouseUp
		 */
		virtual void handleMouseUp(const wxPoint&);
		/**
		 * @see IController::handleMouseMotion
		 */
		virtual bool handleMouseMotion(const wxPoint&);
		/**
		 * @see IController::getBitmapToPaint
		 */
		virtual const wxBitmap& getBitmapToPaint() const;
		/**
		 * @see IController::getBitmapToDraw
		 */
		virtual wxBitmap& getBitmapToDraw();

		// Methods inherited from IGameStateController

		/**
		 * @see IGameStateController::handleSocketConnection
		 */
		virtual void handleSocketConnection(wxSocketEvent&);
		/**
		 * @see IGameStateController::handleSocketLost
		 */
		virtual void handleSocketLost(wxSocketEvent&);
		/**
		 * @see IGameStateController::handleSocketInput
		 */
		virtual void handleSocketInput(wxSocketEvent&);
		/**
		 * @see IGameStateController::handleSocketOutput
		 */
		virtual void handleSocketOutput(wxSocketEvent& socketEvent);

	private:
		/**
		 * This object handles the drawings during this state of the application
		 *
		 * @see LogoDrawController
		 */
		LogoDrawController mLogoDrawController;
};

#endif /* IDLEGAMESTATECONTROLLER_H_ */
